﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Moxiecode.TinyMCE.Settings
{
    public class GzipSettingsConverter : ExpandableObjectConverter
    {
        public GzipSettingsConverter() : base() { }

        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
        {
            if (value is GzipSettings && destinationType == typeof(string))
                return ((value as GzipSettings).Enabled) ? "(Enabled)" : "(Disabled)";
            else return base.ConvertTo(context, culture, value, destinationType);
        }
    }
}
